package com.wr.hangzhounewlight.controller;

import com.wr.hangzhounewlight.obj.api.silorawmaterialmappingissue.SiloRawMaterialMappingIssueRequest;
import com.wr.hangzhounewlight.obj.api.silorawmaterialmappingissue.SiloRawMaterialMappingIssueResponse;
import com.wr.hangzhounewlight.service.SiloRawMaterialMappingIssueService;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author yuanzhizhuo
 * createDate 2025/10/23
 */
@CrossOrigin
@RestController
@AllArgsConstructor
public class SiloRawMaterialMappingIssueController {

    private final SiloRawMaterialMappingIssueService service;

    /**
     * 料仓料品对照表下发
     *
     * @param request dto
     * @return 是否下发成功
     */
    @PostMapping("/silo-raw-material-mapping-issue")
    public SiloRawMaterialMappingIssueResponse siloRawMaterialMappingIssue(
            @RequestBody SiloRawMaterialMappingIssueRequest request
    ) {
        return service.siloRawMaterialMappingIssue(request);
    }

}
